Translate tutorial/inputoutput.po#74
Conversation
1. rst:330 was not updated. 2. Fix a "一" (注音文) in datastructures.po
Only change 「」 marks. Thanks!
Update msgid of rst:330, 335. Completed.
adrianliaw
left a comment
There was a problem hiding this comment.
目前看到 inputoutput.rst:302
| "Inside this string, you can write a Python expression between ``{`` and ``}" | ||
| "`` characters that can refer to variables or literal values." | ||
| msgstr "" | ||
| "要使用\\ :ref:`格式化的字串文本 (formatted string literals) <tut-f-strings>`" |
There was a problem hiding this comment.
「格式化字串文本」應該就可以了(格式化字串這個名詞感覺應該已經用很久了)
| "string type has some methods that perform useful operations for padding " | ||
| "strings to a given column width." | ||
| msgstr "" | ||
| "最後,你還可以自己用字串切片 (slicing) 和序連 (concatenation) 運算,完成所有" |
| "string type has some methods that perform useful operations for padding " | ||
| "strings to a given column width." | ||
| msgstr "" | ||
| "最後,你還可以自己用字串切片 (slicing) 和序連 (concatenation) 運算,完成所有" |
| "strings to a given column width." | ||
| msgstr "" | ||
| "最後,你還可以自己用字串切片 (slicing) 和序連 (concatenation) 運算,完成所有" | ||
| "的字串處理,建立任何你能想像的排版格式。字串類型有一些 method ,能以給定的欄" |
| "structures like lists and dictionaries, have the same representation using " | ||
| "either function. Strings, in particular, have two distinct representations." | ||
| msgstr "" | ||
| ":func:`str` 函式會將值以人類易讀的表示法回傳,而 :func:`repr` 則會產生直譯器" |
There was a problem hiding this comment.
str 函式的用意是回傳一個人類易讀的表示法 / repr 的用意是產生....
原文會說「meant to return ...」而不是「returns ...」是有原因的,python 並沒有規定 __repr__ 一定要回傳直譯器可讀的程式碼,那只是一個慣例而已
| "字串物件的 :meth:`str.rjust` method 透過在左側填補空格,使字串以給定的欄寬進" | ||
| "行靠右對齊。類似的 method 還有 :meth:`str.ljust` 和 :meth:`str.center`\\ 。這" | ||
| "些 method 不寫入任何內容,只回傳一個新字串,如果輸入的字串太長,它們不會截斷" | ||
| "字串,而是不做任何改變地回傳;雖然這樣會弄亂欄的布置,但這通常還是比另一種情" |
| msgstr "" | ||
| "% 運算子(modulo,模數)也可用於字串格式化。在 ``'string' % values`` 中,\\ " | ||
| "``string`` 的實例 ``%`` 會被 ``values`` 的零個或多個元素所取代。此運算常被稱" | ||
| "為字串內插 (string interpolation)。例如:\n" |
| "string interpolation. For example::" | ||
| msgstr "" | ||
| "% 運算子(modulo,模數)也可用於字串格式化。在 ``'string' % values`` 中,\\ " | ||
| "``string`` 的實例 ``%`` 會被 ``values`` 的零個或多個元素所取代。此運算常被稱" |
There was a problem hiding this comment.
string 中所有的 % 會被 values 的零個或...
| "assumed if it's omitted." | ||
| msgstr "" | ||
| "第一個引數是一個包含檔案名稱的字串。第二個引數是另一個字串,包含了描述檔案使" | ||
| "用方式的幾個字元。\\ *mode* 為 ``'r'`` 時,表示檔案唯讀;為 ``'w'`` 時,表示" |
There was a problem hiding this comment.
s/表示檔案唯讀/表示以唯讀模式開啟檔案
s/表示檔案唯寫/表示以唯寫模式開啟檔案
| "用方式的幾個字元。\\ *mode* 為 ``'r'`` 時,表示檔案唯讀;為 ``'w'`` 時,表示" | ||
| "檔案唯寫(已存在的同名檔案會被抹除);為 ``'a'`` 時,以附加內容為目的開啟檔" | ||
| "案,任何寫入檔案的資料會自動被加入到檔案的結尾。\\ ``'r+'`` 可以開啟檔案並進" | ||
| "行讀取和寫入。\\ *mode* 引數是可選的,若省略時會預設為 ``'r'``。" |
Above suggestions were applied.
| "objects. This mode should be used for all files that don't contain text." | ||
| msgstr "" | ||
| "通常,檔案以 :dfn:`text mode` 開啟,意即,從檔案中讀取或寫入字串時,都以特定" | ||
| "編碼方式進行編碼。如未指定編碼方式,則預設值會取決於平台 (platform dependent)" |
There was a problem hiding this comment.
「取決於系統平台」就可以了,不需要加括弧註解,platform dependent 不算是術語
| "通常,檔案以 :dfn:`text mode` 開啟,意即,從檔案中讀取或寫入字串時,都以特定" | ||
| "編碼方式進行編碼。如未指定編碼方式,則預設值會取決於平台 (platform dependent)" | ||
| "(見 :func:`open`\\ )。在 mode 加上 ``'b'`` 會以 :dfn:`binary mode` 開啟檔" | ||
| "案:此時,資料以位元組物件 (bytes object) 的形式被讀寫。此模式應該使用於所有" |
There was a problem hiding this comment.
hmmmm 我們好像還沒有 bytes 的對應中文術語... 可以考慮位元組串?(位元組是指一個 byte,單數的)
| "file:`JPEG` or :file:`EXE` files. Be very careful to use binary mode when " | ||
| "reading and writing such files." | ||
| msgstr "" | ||
| "在文字模式 (text mode) 下,讀取時會預設把平台指定的 (platform-specific) 行尾" |
There was a problem hiding this comment.
s/平台指定的/平台特定的
然後感覺應該是不需要註釋 platform-specific
| "reading and writing such files." | ||
| msgstr "" | ||
| "在文字模式 (text mode) 下,讀取時會預設把平台指定的 (platform-specific) 行尾" | ||
| "結束符號(Unix 上為 ``\\n``,Windows 上為 ``\\r\\n``)轉換為 ``\\n``。在文字" |
| "\\ -\\ :keyword:`finally` blocks::" | ||
| msgstr "" | ||
| "在處理檔案物件時,使用 :keyword:`with` 關鍵字是個好習慣。優點是,當它的套件結" | ||
| "束後,即使在某個時刻引發了異常,檔案仍會正確地被關閉。使用 :keyword:`!with` " |
| "``f.read()`` will return an empty string (``''``). ::" | ||
| msgstr "" | ||
| "要讀取檔案的內容,可呼叫 ``f.read(size)``,它可讀取一部份的資料,並以字串(文" | ||
| "字模式)或位元組物件(二進制模式)形式回傳。\\ *size* 是個選擇性的數字引數。" |
There was a problem hiding this comment.
s/位元組物件/位元組串物件 或是 bytes (不翻譯)
| "If you want to read all the lines of a file in a list you can also use " | ||
| "``list(f)`` or ``f.readlines()``." | ||
| msgstr "" | ||
| "如果你想要在一個 list 中讀取檔案的所有行,可以用 ``list(f)`` 或 ``f." |
There was a problem hiding this comment.
如果你想把一個檔案的所有行讀進一個 list 裡
| "Other types of objects need to be converted -- either to a string (in text " | ||
| "mode) or a bytes object (in binary mode) -- before writing them::" | ||
| msgstr "" | ||
| "寫入其他類型的物件之前,要先把它們轉換為字串(文字模式)或位元組物件(二進制" |
| "in binary mode and an opaque number when in text mode." | ||
| msgstr "" | ||
| "``f.tell()`` 回傳一個整數,它給出檔案物件在檔案中的當前位置,在二進制模式下表" | ||
| "示為檔案開始至今的位元組數,在文字模式下表示為一個意義不明的數字 (opaque " |
There was a problem hiding this comment.
應該是不需要註釋 opaque number,它就真的是一個意義不明的數字XD
| #: ../../tutorial/inputoutput.rst:498 | ||
| msgid ":mod:`pickle` - the pickle module" | ||
| msgstr "" | ||
| msgstr ":mod:`pickle` - 泡菜模組" |
There was a problem hiding this comment.
是醃黃瓜吧 這個應該直接用原文「pickle 模組」就可以了
Fixed as suggestion.
|
I prefer 「位元組串物件」,and above suggestions were all applied. |
|
✨ 🍰 ✨ |
* Translate inputoutput.po 1. rst:330 was not updated. 2. Fix a "一" (注音文) in datastructures.po * Add translator * Update year of Copyright * Update datastructures.po Only change 「」 marks. Thanks! * Update inputoutput.po Update msgid of rst:330, 335. Completed.
This is the work continued from #53.
Reference: https://terms.naer.edu.tw/